﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;

namespace WMSSystem.YSL
{  /// <summary>
   /// 编码规则实体
   /// </summary>
    public class CodeRule : AuditedAggregateRoot<Guid>
    {
        /// <summary>
        /// 业务类型（如：Warehouse, Location, Product等）
        /// </summary>
        [MaxLength(50)]
        public string BusinessType { get; set; }

        /// <summary>
        /// 编码前缀
        /// </summary>
        [MaxLength(20)]
        public string Prefix { get; set; }

        /// <summary>
        /// 日期格式（如：yyyyMMdd）
        /// </summary>
        [MaxLength(20)]
        public string DateFormat { get; set; }

        /// <summary>
        /// 当前流水号
        /// </summary>
        public int CurrentNumber { get; set; }

        /// <summary>
        /// 流水号长度
        /// </summary>
        public int NumberLength { get; set; }

        /// <summary>
        /// 上次重置日期
        /// </summary>
        public DateTime? LastResetDate { get; set; }

        /// <summary>
        /// 重置周期（None, Daily, Monthly, Yearly）
        /// </summary>
        [MaxLength(10)]
        public string ResetPolicy { get; set; }
    }
}
